#include <iostream>
#include "..\Modulos\Iterador.h"
#include "..\Modulos\Normal.h"
#include "..\Modulos\Especial.h"

int main(){

    Iterador * Iter = new Iterador();

    Objeto * socn1= new Normal(55555555,"Norm1",80.0,30.0);          //100+80+30
    Objeto * socn2= new Normal(11111111,"Norm2",80.0,30.0);          //100+80+30
    Objeto * socn3= new Normal(77777777,"Norm3",80.0,20.0);          //100+80+20
    Objeto * socn4= new Normal(44444444,"Norm4",80.0,0.0);           //100+80
                                                                    //=800
    Fecha fech1(5,5,2010);
    Fecha fech2(30,12,2009);
    Fecha fech3(1,1,2011);
    Fecha fech4(28,2,2010);

    Objeto * socb1= new Becado(22222222,"Bec1",80.0,1,fech1);        //100+24
    Objeto * socb2= new Becado(66666666,"Bec2",80.0,2,fech2);        //100+40
    Objeto * socb3= new Becado(33333333,"Bec3",80.0,3,fech3);        //100+24
    Objeto * socb4= new Becado(99999999,"Bec4",80.0,4,fech4);        //100+24
                                                                    //=512

    Objeto * soce1= new Especial(88888888,"Esp1",80.0,1,fech1,20);   //100+24-20
    Objeto * soce2= new Especial(00000000,"Esp2",80.0,2,fech2,30);   //100+40-30

    cout << "Se crearon 10 Obetos socio\n\n";

    Iter->insertar(socn1);
    Iter->insertar(socn2);
    Iter->insertar(socn3);
    Iter->insertar(socn4);
    Iter->insertar(socb1);
    Iter->insertar(socb2);
    Iter->insertar(socb3);
    Iter->insertar(socb4);
    Iter->insertar(soce1);
    Iter->insertar(soce2);

    cout << "Se insertaron los 10 objetos\n\n";

    int cont=0;
    Objeto * obj;
    while(Iter->hayMasObjetos()){
        obj=Iter->proximoObjeto();
        cont++;

    }

    cout << "En el Iterador hay " << cont << " objetos\n\n";

    return 0;
}
